/*
 * Copyright (c) 2006 - 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

/**
 * <p>Project: app2022 - Nio4
 * <p>Powered by webrx On 2022-01-20 11:37:01
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Nio4 {
    public static void main(String[] args) throws IOException {
        //nio 删除文件
        //Files.delete(Paths.get("m.txt"));
        //Files.deleteIfExists(Paths.get("m2.txt"));

        //nio 文件复制
        //Files.copy(Paths.get("p2.jpg"), Paths.get("pok.jpg"));

        //nio 更名，移动文件(剪切粘贴文件)
        Files.move(Paths.get("p2.jpg"), Paths.get("p33.jpg"));
    }
}
